home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Know Your Hockey - The Greatest Player Resource
/
Know Your Hockey: The Greatest Player Resource.iso
/
hockey
/
director
/
ssqcst.cst
/
00011_Script_ButtonKit
< prev
next >
Wrap
Text File
|
1998-09-28
|
4KB
|
135 lines
------------------ Init List For Button State Tracking --------------------
-- called from on startmovie or the first exitframe script in the movie
-- loads a default list of 0
-- the list is used by ButtonKit to set the positions to 1 to
-- track which buttons are on or off
global gButtonState,gHion,gOpning
on initButtonKit
set gButtonState = []
repeat with x = 1 to 48
append gbuttonState,0
end repeat
end
------------------- Three State Button --------------------------------------
-- if a button has three states then call ThreeStateButton as the first line in any scripts
-- that are attached to the button
on ThreeStateButton
set gOpning = EMPTY
set mybutton = the clickon
set one = getat(gbuttonState, mybutton)
if one = 0 then
set the membernum of sprite mybutton = the membernum of sprite mybutton +1
setat(gbuttonState, mybutton,2)
end if
end
-------------------------- Two State Buttons --------------------------
-- if a button has two states then call TwoStateButton as the first line in any scripts
-- that are attached to the button
on TwoStateButton
set gOpning = EMPTY
set mybutton = the clickon
setat(gButtonState,mybutton,1)
end
------------------------- Reset Button States -----------------------------------
-- toggles off any button that any ready on
-- these scripts are placed in the second line of a button handler
-- after ThreeStateButton or twostatebutton
-- they are divided into groups attach the correct group to you handler
-- attach to VCR buttons
on resetVCR
set mybutton = the clickon
repeat with y = 20 to 24
set thisone = getat(gbuttonState,y)
if thisone > 0 and y <> mybutton then
set the membernum of sprite y = the membernum of sprite y -1
setat(gbuttonState,y,0)
exit
end if
end repeat
end
-- attach to pro and Jr Buttons
on resetPro
set mybutton = the clickon
repeat with y = 24 to 25
set thisone = getat(gbuttonState,y)
if thisone > 0 and y <> mybutton then
set the blend of sprite y = 0
set the membernum of sprite y = the membernum of sprite y -1
setat(gbuttonState,y,0)
exit
end if
end repeat
end
--- attach to players
on resetPlayers
set mybutton = the clickon
repeat with y = 11 to 16
set thisone = getat(gbuttonState,y)
if thisone > 0 and y <> mybutton then
set the blend of sprite y = 0
set the membernum of sprite y = the membernum of sprite y -1
setat(gbuttonState,y,0)
updatestage
end if
end repeat
end
-- attach to ButtonBanner
on resetBanner
if the clickon = 4 then exit -- if you are on the puck slider
set mybutton = the clickon
repeat with y = 18 to 23
set thisone = getat(gbuttonState,y)
if thisone > 0 and y <> mybutton then
set the membernum of sprite y = the membernum of sprite y -1
setat(gbuttonState,y,0)
set the blend of sprite y = 0
updatestage
end if
end repeat
end
-- attach to Icon Cards script
on resetIcons
set mybutton = the clickon
repeat with y = 44 to 46
set thisone = getat(gbuttonState,y)
if thisone > 0 and y <> mybutton then
set the membernum of sprite y = the membernum of sprite y -1
setat(gbuttonState,y,0)
exit
end if
end repeat
end
on resetSlider
set mybutton = the clickon
repeat with y = 29 to 30
set thisone = getat(gbuttonState,y)
if thisone > 0 and y <> mybutton then
setat(gbuttonState,y,0)
updatestage
exit
end if
end repeat
end